package cn.me.implement.threadpool.v3_0.reject;

import cn.me.implement.threadpool.v3_0.ThreadPool3_0;

/**
 * <h3>抛出异常的拒绝策略</h3>
 */
public class ThrowExceptionPolicy implements RejectPolicy {

    @Override
    public void reject(ThreadPool3_0 threadPool, Runnable task) {
        throw new RuntimeException("线程数量达到最大数量，任务队列已满，无法执行任务");
    }
}
